#include <cstdio>
#include <algorithm>

using namespace std;

int main(int argc, char const *argv[])
{
    char arr[128][128];
    int r, c, k;
    int i, j, t, result;

    scanf("%d%d%d", &r, &c, &k);
    for (i = 0; i < r; i++)
    {
        scanf("%s", arr[i]);
    }

    result = 0;
    for (i = 0; i < r; i++)
    {
        t = 0;
        for (j = 0; j < c; j++)
        {
            if (arr[i][j] == '#') t = 0;
            else if (arr[i][j] == '.') t++;
            if (t >= k) result++;
        }
    }

    for (i = 0; i < c; i++)
    {
        t = 0;
        for (j = 0; j < r; j++)
        {
            if (arr[j][i] == '#') t = 0;
            else if (arr[j][i] == '.') t++;
            if (t >= k) result++;
        }
    }

    if (k == 1) result /= 2;
    printf("%d", result);

    return 0;
}
